package util;

import java.util.ArrayList;

import org.junit.Test;

import com.gdpu.project.util.excel.WriteExcel;

public class ExportExcel {
	@Test
	public void writeExcel() {
		ArrayList<String[]> studentList = new ArrayList<String[]>();
		String tiltes[] = { "学号", "姓名", "班级", "就业方向", "职业", "就业地点", "工作职位",
				"工作时间" };
		long startTime = System.currentTimeMillis();
		for (int i = 0; i < 10000; i++) {
			String student[] = { String.valueOf(i), "软件", ".net工程师", "梁飞龙",
					"07计算机医学应用（1）", "广东省中山市中山韦达信息技术有限公司", "Java工程师", "半年" };
			studentList.add(student);
		}
		long time = System.currentTimeMillis();
		System.out.println((time - startTime) + "ms");
		try {
			WriteExcel.write(tiltes, "d:\\项目信息统计.xls", "项目信息统计", studentList);
		} catch (Exception e) {
			e.printStackTrace();
		}
		long endTime = System.currentTimeMillis();
		System.out.println("使用的时间为：" + (endTime - startTime) + "ms");
	}

}
